"""Maps request URLs to modules that will handle the requests.
   Edit if adding a complex new class to the model or a new interface.
   List and edit methods try to find a sensible default. """

from django.conf.urls.defaults import *

urlpatterns = patterns('',
	(r'^duetopia/register/$', 'django.views.generic.simple.redirect_to',
			{ 'url' : '/duetopia/register/dataset/' }),
	(r'^duetopia/(register)/static/(.*)$', 'duetopia.register.views.static_file'),
	(r'^duetopia/feature/([^/]+)/([^/]+)/([^/]+)\.([^.]+)$', 'duetopia.register.views.feature'),
	(r'^duetopia/register/dataset/search/$', 'duetopia.register.views.search_list'),
	(r'^duetopia/register/dataset/search/spatial/$', 'duetopia.register.views.search_spatial'),
	(r'^duetopia/register/layer/([^/]+)/$', 'duetopia.register.views.view_layer'),
	(r'^duetopia/register/layer/([^/]+)/thumb/$', 'duetopia.register.views.view_thumb'),
	(r'^duetopia/register/datasource/add/$', 'duetopia.register.views.add_datasource'),
	(r'^duetopia/register/datasource/add/to/([^/]+)/$', 'duetopia.register.views.add_datasource'),
	(r'^duetopia/register/datasource/([^/]+)/$', 'duetopia.register.views.view_datasource'),
	(r'^duetopia/register/dataset/add/$', 'duetopia.register.views.add_dataset'),
	(r'^duetopia/register/timespan/for/([^/]+)/([^/]+)/$', 'duetopia.register.views.edit_timespan'),
	(r'^duetopia/register/extents/for/([^/]+)/$', 'duetopia.register.views.add_dataset_extents'),
	(r'^duetopia/register/dataset/([^/]+)/extend/$', 'duetopia.register.views.extend_dataset'),
	(r'^duetopia/register/dataset/([^/]+)/extend/([^/]+)/$', 'duetopia.register.views.extend_dataset'),
	(r'^duetopia/register/dataset/([^/]+)/detach/contact/([^/]+)/$', 'duetopia.register.views.detach_dataset_agent'),
	(r'^duetopia/register/agent/([^/]+)/$','duetopia.register.views.view_agent'),
	
	(r'^duetopia/([^/]+)/([^/]+)/add/?$','duetopia.register.views.edit_object'),
	(r'^duetopia/register/dataformat/([^/]+)/?$','duetopia.register.views.edit_format'),
	
	(r'^duetopia/register/dataset/([^/]+)/$', 'duetopia.register.views.view_dataset'),
	(r'^duetopia/([^/]+)/([^/]+)/([^/]+)/edit/$', 'duetopia.register.views.edit_object'),
	(r'^duetopia/register/opensearch/description/?$', 'duetopia.register.views.description'),
	(r'^duetopia/register/opensearch/?$', 'duetopia.register.views.opensearch_list'),
	(r'^duetopia/register/dataset/([^/]+)/iso19115/$', 'duetopia.register.views.view_iso19115'),
	(r'^duetopia/register/dataset/([^/]+)/rdf/$', 'duetopia.register.views.view_rdf'),
	(r'^duetopia/([^/]+)/([^/]+)/$', 'duetopia.register.views.list_objects'),
)
	
